Optimal. Leaf size=35 \[ \frac{a^2 \log (\sin (c+d x))}{d}+2 a b x-\frac{b^2 \log (\cos (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0367422, antiderivative size = 35, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.105, Rules used = {3541, 3475} \[ \frac{a^2 \log (\sin (c+d x))}{d}+2 a b x-\frac{b^2 \log (\cos (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3541
Rule 3475
Rubi steps
\begin{align*} \int \cot (c+d x) (a+b \tan (c+d x))^2 \, dx &=2 a b x+a^2 \int \cot (c+d x) \, dx+b^2 \int \tan (c+d x) \, dx\\ &=2 a b x-\frac{b^2 \log (\cos (c+d x))}{d}+\frac{a^2 \log (\sin (c+d x))}{d}\\ \end{align*}
Mathematica [A] time = 0.0600533, size = 43, normalized size = 1.23 \[ \frac{a^2 (\log (\tan (c+d x))+\log (\cos (c+d x)))}{d}+2 a b x-\frac{b^2 \log (\cos (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.043, size = 44, normalized size = 1.3 \begin{align*} 2\,abx-{\frac{{b}^{2}\ln \left ( \cos \left ( dx+c \right ) \right ) }{d}}+{\frac{{a}^{2}\ln \left ( \sin \left ( dx+c \right ) \right ) }{d}}+2\,{\frac{abc}{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.54114, size = 66, normalized size = 1.89 \begin{align*} \frac{4 \,{\left (d x + c\right )} a b + 2 \, a^{2} \log \left (\tan \left (d x + c\right )\right ) -{\left (a^{2} - b^{2}\right )} \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.71908, size = 135, normalized size = 3.86 \begin{align*} \frac{4 \, a b d x + a^{2} \log \left (\frac{\tan \left (d x + c\right )^{2}}{\tan \left (d x + c\right )^{2} + 1}\right ) - b^{2} \log \left (\frac{1}{\tan \left (d x + c\right )^{2} + 1}\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.690321, size = 70, normalized size = 2. \begin{align*} \begin{cases} - \frac{a^{2} \log{\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} + \frac{a^{2} \log{\left (\tan{\left (c + d x \right )} \right )}}{d} + 2 a b x + \frac{b^{2} \log{\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} & \text{for}\: d \neq 0 \\x \left (a + b \tan{\left (c \right )}\right )^{2} \cot{\left (c \right )} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.47952, size = 68, normalized size = 1.94 \begin{align*} \frac{4 \,{\left (d x + c\right )} a b + 2 \, a^{2} \log \left ({\left | \tan \left (d x + c\right ) \right |}\right ) -{\left (a^{2} - b^{2}\right )} \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]